package com.example.testdemo.coordinator;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.view.Gravity;

import com.example.testdemo.R;

/**
 * Created by zhangwenxiang on 2018/9/29.
 */

public class ConstraintLayoutActivity extends Activity{
    TabLayout tabLayout;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.constraint_layout_test_view);

        tabLayout = findViewById(R.id.tab_layout);
        initTabLayout();
    }

    private void initTabLayout(){
        tabLayout.setSelectedTabIndicatorColor(Color.BLUE);
        tabLayout.setSelectedTabIndicatorHeight(10);
        tabLayout.setTabGravity(Gravity.CENTER);
    }
}
